<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:variable name="bn" select="document('catalog.xml')"/>
    <xsl:variable name="amazon" select="document('reviews.xml')"/>
    
    <xsl:template match="/">
        <books-with-prices>
            <xsl:for-each select="$bn//book[title=$amazon//entry/title]">
                <xsl:text>
                    
                </xsl:text>
                <book-with-author>
                    <xsl:copy-of select="title"/>
                    <xsl:text>
                        
                    </xsl:text>
                    <price-amazon>
                        <xsl:value-of select="$amazon//entry[title=current()/title]/author"/>
                    </price-amazon>
                    <xsl:text>
                        
                    </xsl:text>
                    <price-bn>
                        <xsl:value-of select="author"/>
                    </price-bn>
                    <xsl:text>
                        
                    </xsl:text>
                </book-with-author>
            </xsl:for-each>
        </books-with-prices>
    </xsl:template>
</xsl:stylesheet>
